package com.firewolf.vue.controller;

import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * 作者：刘兴
 * 时间:19/3/6
 **/
//@Controller
@RequestMapping
public class LoginController {

    @GetMapping("/login")
    public String login() {
        //界面编程： swing , awt
        return "/login.html";
    }

    @GetMapping("/info")
    public String userinfo() {
        return SecurityContextHolder.getContext().getAuthentication().getDetails().toString();
    }
}
